#include "dataMessage.h"

void createDataMessage(char * filename, unsigned short seqn, unsigned short contentLength) {
	
	int currentPosition;
	unsigned char finMessage[strlen(filename)+ 3];
	finMessage[0] = 0xDD;
	currentPosition = 1;
	// Insert sequence number into data message.
	currentPosition += sizeToBytes(seqn, finMessage, currentPosition);
	strcpy(finMessage+currentPosition, filename);
	// Add 1 for the additional '\0' character.
	currentPosition += strlen(filename) + 1;
	// Insert content length (payload) into data message.
	currentPosition += sizeToBytes(contentLength, finMessage, currentPosition);
	
	/**** NEED TO INSERT PAYLOAD INTO DATA MESSAGE ****/
	
	
}